package com.eshin.demo.custom;

import org.xml.sax.Attributes;

import ch.qos.logback.core.joran.action.Action;
import ch.qos.logback.core.joran.spi.ActionException;
import ch.qos.logback.core.joran.spi.InterpretationContext;

public class MyRuleAction extends Action {

	@Override
	public void begin(InterpretationContext ic, String name, Attributes attributes) throws ActionException {

		System.out.println("begin : "+name);
		System.out.println("begin : "+attributes.getValue("myname")+":"+attributes.getValue("age"));
	}

	@Override
	public void body(InterpretationContext ic, String body) throws ActionException {
		System.out.println("body : "+body);
		super.body(ic, body);
	}
	
	@Override
	public void end(InterpretationContext ic, String name) throws ActionException {
		System.out.println("end : "+name);
	}

}
